If you are using the Visual Studio Toolbox (described further below) to add instances of components to your project, the NuGet package and/or assembly references are created for you by Visual Studio automatically, when you drag the component onto the designer’s surface.
This technique only works for certain kinds of projects (such as Windows Forms or WPF) and certain kinds of project items in them.
This is the approach used in the "Getting Started" articles:
In runtime, all user interface features (such as controls, dialogs, and live binding; Windows Forms and WPF) and nonvisual components are supported both under .NET Framework and .NET 6+. However, "designing" them (this includes tasks like dragging from the Toolbox, or configuring in Properties window) in Visual Studio is only possible in .NET Framework projects. In order to achieve visual design for .NET 6+ projects, the developer can make two project files over the same set of source files, one targeting .NET Framework and one targeting .NET 6+, and use the project that targets .NET Framework for visual design tasks. |